<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" charset="utf-8">
        //桥接模式
        /**
         * 特权函数
         */
        var PublicClass = function () {
            var name = '张三';
            //getter 访问私有成员变量
            this.getName = function () {
                return name;
            }
        }
        var p1 = new PublicClass();
        alert(p1.getName());
    </script>
</head>
<body>
</body>
</html>